package com.oocl.crm.command.receiver;

import com.oocl.crm.command.BaseReceiver;
import com.oocl.crm.exception.CrmException;
import com.oocl.crm.util.CommandParser;

public class UpdateReceiver extends BaseReceiver {

	public UpdateReceiver(String[] commandSplit) {
		super(commandSplit);
	}

	@Override
	public String action() throws CrmException {
		String[] info = CommandParser.parseCustomerInfo(commandSplit[2]);
		service.updateCustomerById(commandSplit[1], info[1], info[2], info[3], info[4], info[5]);
		return "Update Success!";
	}

}
